using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class SysCarShopsExtend
{
		public static ResponseSysCarShopsDto ToResponseDto(this SysCarShops entity)
{			return new ResponseSysCarShopsDto
			{
				id = entity.CsId,
				account = entity.CsAccount,
				name = entity.CsName,
				isBan = entity.CsIsBan,
				isSelf = entity.CsIsSelf,
				address = entity.CsAddress,
				province = entity.CsProvince,
				city = entity.CsCity,
				county = entity.CsCounty,
				postalCode = entity.CsPostalCode,
				phone = entity.CsPhone,
				email = entity.CsEmail,
				website = entity.CsWebsite,
				type = entity.CsType,
				managerName = entity.CsManagerName,
				shopImages = entity.CsShopImages,
				certificateImages = entity.CsCertificateImages,
				openingDate = entity.CsOpeningDate,
				openingDateStr =Tools.TimeToString(entity.CsOpeningDate),
				isOpen = entity.CsIsOpen,
				operatingHours = entity.CsOperatingHours,
				notes = entity.CsNotes,
				createdAt = entity.CsCreatedAt,
				createdAtStr =Tools.TimeToString(entity.CsCreatedAt),
				updatedAt = entity.CsUpdatedAt,
				updatedAtStr =Tools.TimeToString(entity.CsUpdatedAt),
			};
		}
	}
}
